﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Drawing;
using dotBot.Beacon;

namespace TestProject
{
    [TestClass]
    public class UnitTest1
    {
        [TestMethod]
        public void TestMethod1()
        {
            for (int r = 0; r < 256; r++)
            {
                for (int g = 0; g < 256; g++)
                {
                    for (int b = 0; b < 256; b++)
                    {
                        Color color = Color.FromArgb(r, g, b);

                        double h;
                        double s;
                        double l;
                        HsvHelper.ColorToHSL(color, out h, out s, out l);

                        Assert.AreEqual(color.GetHue(), h);
                        Assert.AreEqual(color.GetSaturation(), s);
                        Assert.AreEqual(color.GetBrightness(), l);
                    }
                }
            }
        }
    }
}
